﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <!--BEGIN RADIOBUTTON-->
    <Style TargetType="{x:Type RadioButton}">
        <Setter Property="FontFamily" Value="Tahoma"/>
        <Setter Property="FontSize" Value="11"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="FontStyle" Value="Normal"/>
        <Setter Property="Foreground" Value="{DynamicResource BrushRadioButtonForeground}"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Height" Value="22"/>
        <Setter Property="Width" Value="100" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RadioButton}">
                    <BulletDecorator Background="Transparent">
                        <BulletDecorator.Bullet>
                            <Grid Height="21" Width="21">
                                <Border Height="17" Width="17" Padding="2">
                                    <Border x:Name="Border" BorderBrush="{DynamicResource BrushRadioButtonBorder}" BorderThickness="1" Background="{DynamicResource BrushRadioButtonBackground}" Width="13" Height="13" CornerRadius="6">
                                        <Grid>
                                            <Ellipse x:Name="CheckMark" HorizontalAlignment="Left" Margin="2,2,0,0" VerticalAlignment="Top" Width="7.063" Height="7.062" Stroke="{x:Null}" Fill="{DynamicResource BrushRadioButtonCheckMarkFill}"/>
                                            <Ellipse x:Name="Path" Fill="{x:Null}" HorizontalAlignment="Left" VerticalAlignment="Top" Width="11.2" Height="11.2" StrokeThickness="2" Visibility="Collapsed"/>
                                        </Grid>
                                    </Border>
                                </Border>
                                <Rectangle x:Name="RectangleBullet" Stroke="{DynamicResource BrushCheckBoxBorderFocused}" StrokeDashArray="2 2" StrokeThickness="1" SnapsToDevicePixels="true" Height="17" Width="17" VerticalAlignment="Center" Visibility="Collapsed"/>
                            </Grid>
                        </BulletDecorator.Bullet>
                        <Grid Height="21">
                            <Rectangle x:Name="RectangleContent" Stroke="{DynamicResource BrushRadioButtonBorderFocused}" StrokeDashArray="2 2" StrokeThickness="1" Margin="3" SnapsToDevicePixels="true" Height="16" VerticalAlignment="Center" Visibility="Collapsed"/>
                            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="5,0,0,0" VerticalAlignment="Center" RecognizesAccessKey="True"/>
                        </Grid>
                    </BulletDecorator>
                    <ControlTemplate.Triggers>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver" Value="True"/>
                                <Condition Property="IsMouseCaptured" Value="False"/>
                            </MultiTrigger.Conditions>
                            <Setter Property="Visibility" Value="Visible" TargetName="Path"/>
                            <Setter Property="Width" Value="10.989" TargetName="Path"/>
                            <Setter Property="Height" Value="10.997" TargetName="Path"/>
                            <Setter Property="Stroke" Value="{DynamicResource BrushRadioButtonBackgroundHover}" TargetName="Path"/>
                        </MultiTrigger>
                        <Trigger Property="IsFocused" Value="True">
                            <Setter Property="Visibility" Value="Visible" TargetName="RectangleContent"/>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsFocused" Value="True"/>
                                <Condition Property="Content" Value=""/>
                            </MultiTrigger.Conditions>
                            <Setter Property="Visibility" Value="Collapsed" TargetName="RectangleContent"/>
                            <Setter Property="Visibility" Value="Visible" TargetName="RectangleBullet"/>
                        </MultiTrigger>
                        <Trigger Property="IsMouseCaptured" Value="True">
                            <Setter Property="Background" Value="{DynamicResource BrushRadioButtonBackgroundPressed}" TargetName="Border"/>
                        </Trigger>
                        <Trigger Property="IsChecked" Value="False">
                            <Setter Property="Visibility" Value="Collapsed" TargetName="CheckMark"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="{DynamicResource BrushRadioButtonForegroundDisabled}"/>
                            <Setter Property="BorderBrush" Value="{DynamicResource BrushRadioButtonBorderDisabled}" TargetName="Border"/>
                            <Setter Property="Background" Value="{DynamicResource BrushRadioButtonBackgroundDisabled}" TargetName="Border"/>
                            <Setter Property="Fill" Value="{DynamicResource BrushRadioButtonCheckMarkFillDisabled}" TargetName="CheckMark"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!--END RADIOBUTTON-->
</ResourceDictionary>